package p.ithorns.integration.aop.point;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.stereotype.Component;

/**
 * LogAdvice
 * TODO ithorns
 *
 * @author Ht.L
 * @date 2024-03-10 13:55
 * @since 1.0.0
 */
//@Component
public class Log2Advice implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("Before method2.");
        Object result = invocation.proceed();
        System.out.println("After method2.");
        return result;
    }

}